package br.com.duduso.conferencia_claro_desktop.model;

import java.util.Vector;
import javax.swing.table.DefaultTableModel;

/**
 * Table Model Customizado, Para Bloquear a Edição das
 * Células da Tabela
 * @author duduso
 */
public class CustomTableModel extends DefaultTableModel {

        private boolean isCellsEditable = false;

        public CustomTableModel() {
        }

        public CustomTableModel(Object[][] data, Object[] columnNames) {
                super(data, columnNames);
        }

        public CustomTableModel(Vector data, Vector columnNames) {
                super(data, columnNames);
        }

        public CustomTableModel(Object[] columnNames, int rowCount) {
                super(columnNames, rowCount);
        }

        public CustomTableModel(Vector columnNames, int rowCount) {
                super(columnNames, rowCount);
        }

        public CustomTableModel(int rowCount, int columnCount) {
                super(rowCount, columnCount);
        }

        @Override
        public boolean isCellEditable(int row, int column) {
                return isCellsEditable;
        }

        public void isCellsEditable(){
                this.isCellsEditable = true;
        }

}
